@extends('layout.public')
@section('content')
<div class="wrapper wrapper-content">
    <div class="row">
            <div class="col-sm-4">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h1>今日销量</h1>
                    </div>
                    <div class="ibox-content text-success">
                        <h3 class="no-margins"><small>销售额（元）：</small>40 886,200</h3>
                        <h3 class="no-margins"><small>销售量（件）：</small>40 886,200</h3>
                        <h3 class="no-margins"><small>净利润（元）：</small>40 886,200</h3>
                    </div>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h1>昨日销量</h1>
                    </div>
                    <div class="ibox-content text-info">
                        <h3 class="no-margins"><small>销售额（元）：</small>40 886,200</h3>
                        <h3 class="no-margins"><small>销售量（件）：</small>40 886,200</h3>
                        <h3 class="no-margins"><small>净利润（元）：</small>40 886,200</h3>
                    </div>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h1>本月累计</h1>
                    </div>
                    <div class="ibox-content text-navy">
                        <h3 class="no-margins"><small>销售额（元）：</small>40 886,200</h3>
                        <h3 class="no-margins"><small>销售量（件）：</small>40 886,200</h3>
                        <h3 class="no-margins"><small>净利润（元）：</small>40 886,200</h3>
                    </div>
                </div>
            </div>
        </div>
    <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>统计图</h5>
                        <div class="pull-right">
                            <div class="btn-group">
                                <button type="button" class="btn btn-xs btn-white active">天</button>
                                <button type="button" class="btn btn-xs btn-white">月</button>
                                <button type="button" class="btn btn-xs btn-white">年</button>
                            </div>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="ibox float-e-margins">
                                    <div class="ibox-content">
                                        <div class="echarts" id="echarts-line-chart"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
</div>
@endsection
@section('js_block')
    <!-- ECharts -->
    <script src="/js/plugins/echarts/echarts-all.js"></script>


    <script>
        $(document).ready(function () {
            var lineChart = echarts.init(document.getElementById("echarts-line-chart"));
            var lineoption = {
                title : {
                    text: ''
                },
                tooltip : {
                    trigger: 'axis'
                },
                legend: {
                    data:['销售额','销量','净利润']
                },
                grid:{
                    x:40,
                    x2:40,
                    y2:24
                },
                calculable : true,
                xAxis : [
                    {
                        type : 'category',
                        boundaryGap : false,
                        data : ['周一','周二','周三','周四','周五','周六','周日']
                    }
                ],
                yAxis : [
                    {
                        type : 'value',
                       /* axisLabel : {
                            formatter: '{value} °C'
                        }*/
                    }
                ],
                series : [
                    {
                        name:'销售额',
                        type:'line',
                        data:[11, 11, 15, 13, 12, 13, 10]
                    },
                    {
                        name:'销量',
                        type:'line',
                        data:[12, 14, 122, 33, 124, 143, 140]
                    },
                    {
                        name:'净利润',
                        type:'line',
                        data:[1, 33, 2, 5, 3, 2, 333]
                    }
                ]
            };
            lineChart.setOption(lineoption);

            $(window).resize(lineChart.resize);
        });
    </script>
@endsection